/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package com.pancho;

import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class QuestionCriteria extends AbstractORMCriteria {
	public final IntegerExpression idQuest;
	public final StringExpression question;
	
	public QuestionCriteria(Criteria criteria) {
		super(criteria);
		idQuest = new IntegerExpression("idQuest", this);
		question = new StringExpression("question", this);
	}
	
	public QuestionCriteria(PersistentSession session) {
		this(session.createCriteria(Question.class));
	}
	
	public QuestionCriteria() throws PersistentException {
		this(com.pancho.Taller1PDSPersistentManager.instance().getSession());
	}
	
	public QuestFormCriteria createQuestFormCriteria() {
		return new QuestFormCriteria(createCriteria("questForm"));
	}
	
	public ResponseCriteria createResponseCriteria() {
		return new ResponseCriteria(createCriteria("ORM_Response"));
	}
	
	public Question uniqueQuestion() {
		return (Question) super.uniqueResult();
	}
	
	public Question[] listQuestion() {
		java.util.List list = super.list();
		return (Question[]) list.toArray(new Question[list.size()]);
	}
}

